package scau.mis4.chanyulin.dictionary;

import scau.mis4.chanyulin.base.common.IBaseCode;

/**
 * Created by cyl on 2017/1/15.
 */
public enum Code implements IBaseCode {
    OPERATION_SUCCESS(0, "操作成功"),
    OPERATION_ERROR(1, "操作失败"),
    ADD_DATA_ERROR(2, "新增失败"),
    QUERY_DATA_ERROR(3, "查询失败"),
    ILLEGAL_DATA_ERROR(4,"非法参数"),
    USER_NO_EXIST(5,"用户不存在"),
    INCORRECT(6,"用户名或者密码错误"),
    UPDATE_DATA_ERROR(7,"更新失败"),
    USER_EXIST(8,"该用户已被注册"),
    USER_SUCCESS(9,"该用户可以注册"),
    UN_LOGIN(10,"用户未登陆"),
    REJECT(11, "该资源不存在或者拒绝访问");

    private int code;
    private String message;

    Code(int code, String message) {
        this.code = code;
        this.message = message;
    }

    public int getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }

}
